package myoa

import myoa.domain.Trace

class Project extends Trace {
    String name
    String comment
    static hasMany = [proUsers: ProUser, proCompanies: ProCompany, tasks: Task]
    static constraints = {
        name(unique: true, blank: false)
        comment(nullable: true)
    }

    static mapping = {
        comment(length: 200)
        tasks(sort: 'finishedDate', order: 'desc')
        //sort(lastUpdated: 'desc')  //todo 似乎不起作用
    }
}
